package com.example.day14_7_14_1;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;

public class DrawView extends View {

    private Paint circle;

    public DrawView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initPaint();
    }

    private void initPaint() {
        circle = new Paint();
        circle.setStyle(Paint.Style.STROKE);
        circle.setStrokeWidth(20);
        circle.setAntiAlias(true);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        initDrawLine(canvas);
    }

    private void initDrawLine(Canvas canvas) {
        canvas.drawCircle(150,150,100,circle);
    }
}
